local app = require 'app'
local game = app.game.running

local seen_card = game.ui.element()

seen_card.store_watchers = 
{
    ingame = 
    {
        ['$'] = function()

        end,

        ['展示底牌'] = function(self, store, state)
            self.poker_container:clear()
            self.poker_container:mopai(state.seen_card_ids)
        end
    }
}

function seen_card:ctor()
    self.res = "club.threecard.doudizhu/ui/ingame.b:seen_card"

    local container = game.pokerlib.core.poker_container
    local config = game.require 'pokers.seen_container_config'
    self.poker_container = container.new(config)
end

function seen_card:on_injected(bind)
    self.poker_container:set_gameobject(self.poker_container_obj, true)
end

function seen_card:clear_scene()
    self.poker_container:clear()
end

return seen_card